function loadForm(url,callback,scope){
	Ext.Ajax.request({
					method : 'POST',// 为了不丢失js文件内容，所以要选择post的方式加载js文件
					url : url,
					scope : scope,
					headers: {
				      'Cache-Control':'max-age=0'
				   },
					success : function(response) {
							var form=eval(response.responseText);
							if(form.form==null)
							form=new Ext.form.FormPanel(form);
							Ext.callback(callback,this,[form]);
					}
				});
}


function submitFormPanel(formPanel, url, successFun, failureFun, waitMsg) {
	if (!formPanel.getForm().isValid())
		return;
	if (!successFun)
		successFun = function(form, action) {
			Ext.Msg.alert("提示", action.result.info);
		}
	if (!failureFun)
		failureFun = function(form, action) {
			errAlert(action.result.info);
		}
	formPanel.getForm().submit({
				waitMsg : waitMsg,
				waitTitle : "提示",
				url : url,//
				method : "post",
				success : successFun,
				failure : failureFun
			});
}
